# CMakeList.txt: CMWebScoket 的 CMake 项目，在此处包括源代码并定义
# 项目特定的逻辑。
#
cmake_minimum_required (VERSION 3.8)

# set(VCPKG_ROOT "D:/usr/vcpkg")
# SET(CMAKE_TOOLCHAIN_FILE "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake")

project ("jgcx")


set(ROOTHOMEPATH ${PROJECT_SOURCE_DIR})
set(HOMEROOT ${PROJECT_SOURCE_DIR})
message("${HOMEROOT}")
message("${VSENV}")
message("${CMAKE_BUILD_TYPE}")

if (NOT CMAKE_BUILD_TYPE)
   set (CMAKE_BUILD_TYPE "Debug")
   message (
      STATUS "No CMAKE_BUILD_TYPE selected, defaulting to ${CMAKE_BUILD_TYPE}"
   )
endif ()

if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
add_compile_options(/utf-8)
endif()

message("CMAKE_BUILD_TYPE=======================")
message("${CMAKE_BUILD_TYPE}")

# add_definitions(-DDLLEXPORT="1")

#set(INCDIR include)
set(SRCDIR src)
set(LIBDIR lib)
set(BINDIR bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIBDIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIBDIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${BINDIR})

add_subdirectory(./src/test)
add_subdirectory(./src/jgcxtools)


file(GLOB includefile  "./src/jgcxtools/*.h")
file(COPY ${includefile} DESTINATION ${CMAKE_BINARY_DIR}/include/)